import { Callout } from 'nextra/components'

# Quickstart Guide

**Wiredoor Server is the entry point for all external traffic.**  
This means that the server's public IP address or domain **must be accessible from the internet**,  
or at least from the network where you want to access the exposed services.

Wiredoor is designed to run on a publicly reachable host so it can securely receive inbound traffic and forward it to your internal services over a private VPN tunnel.

This guide will help you get Wiredoor running and expose your first private service to the internet in just a few steps.

## Requirements

- ✅ A Linux VPS or server (bare metal or cloud-based)
- ✅ Public IP address or domain name pointing to the server
- ✅ Open ports:
  - TCP: `80`, `443` — for HTTP and HTTPS traffic
  - UDP: `51820` — for WireGuard VPN (configurable)
  - Optional: a range of ports for exposing TCP services
- ✅ Installed:
  - [Docker Engine](https://docs.docker.com/engine/install/)
  - (Optionally) [Docker Compose](https://docs.docker.com/compose/)

---

## Deploy Wiredoor Server to your remote server

### Clone Wiredoor Docker Setup 

```bash
git clone https://github.com/wiredoor/docker-setup.git
cd docker-setup
```

### Configure environment variables

```bash
cp .env.example .env
nano .env
```

Set your admin email, password, VPN public hostname or IP, and optionally, the TCP port range.
If you modify the TCP port range, make sure to update the `ports:` section in `docker-compose.yml`.

### Start Wiredoor Server

```bash
docker compose up -d
```

### Log in to the Wiredoor web UI

In your browser, Navigate to `https://your_wiredoor_domain_or_ip`. Use the admin credentials from your `.env` file to access the dashboard. 

For more information on using the web UI, visit the [Usage Guide](./usage.mdx)

---

## Configure Wiredoor CLI on your private node

### Install Wiredoor CLI

You can use the auto-installer:

```bash
curl -s https://www.wiredoor.net/install-wiredoor-cli.sh | sh
```

Or download a package from [GitHub Releases](https://github.com/wiredoor/wiredoor-cli/releases).

### Login and register node using `wiredoor-cli`

Run the following on the device you want to connect:

```bash
wiredoor login --url=https://your_deployed_wiredoor_domain_or_ip
```

This will:

- Promp for admin credentials (email and password)
- Ask for a name for the node (default: current hostname)
- Register the node in the server
- Connect it automatically via WireGuard

---

## Expose your first 

If you have a service running locally (e.g. on port 3000), you can expose it:

```bash
wiredoor http myapp --domain app.your.domain.com --port 3000
```

<Callout type="warning" emoji="⚠️">
  The domain `app.your.domain.com` must point to the public Wiredoor server's IP address. 
</Callout>

---

## Learn more

- [Usage](./usage.mdx)
- [CLI Reference](./cli.mdx)
